fix: patch prosemirror-view to widen Android backspace workaround to Gecko#2892
fix: patch prosemirror-view to widen Android backspace workaround to Gecko#2892YousefED wants to merge 2 commits into
Conversation
Some Android keyboards (AOSP LatinIME, FUTO) don't dispatch Backspace key events — presses only surface as `beforeinput` events with inputType `deleteContentBackward`, so keymap-based backspace handling (lifting list items, merging blocks) never runs. prosemirror-view only works around this on Chrome Android (with a timeout-based hack, since preventDefault on that event has no effect there), leaving Firefox on Android broken (#2889). Patch prosemirror-view's `beforeinput` handler with the upstream-shaped fix: on Gecko + Android, when the event is cancelable and no composition is active, route the event through `handleKeyDown` as a synthetic Backspace and prevent the default only when a handler acts on it, so plain character deletion stays native. Applied via pnpm patchedDependencies so it can be tested in a preview environment; intended to be upstreamed to prosemirror-view and dropped here once released. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the synchronous cancelable-beforeinput patch with the minimal variant: extend prosemirror-view's existing Chrome Android timeout workaround for no-effect Backspace presses to also cover Gecko ((chrome || gecko) && android). If this fixes #2889 in the preview environment, it confirms the Firefox + AOSP/FUTO failure mode is "backspace has no DOM effect", which is the datum needed for an upstream report to prosemirror-view. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
|
|
being fixed upstream https://code.haverbeke.berlin/prosemirror/prosemirror/issues/1578 |
Some Android keyboards (AOSP LatinIME, FUTO) don't dispatch Backspace key events — presses only surface as
beforeinput(deleteContentBackward), so keymap-based backspace handling never runs. prosemirror-view has a workaround for backspace presses that have no DOM effect, but it's gated to Chrome Android, leaving Firefox broken (#2889).This patches prosemirror-view (via pnpm
patchedDependencies) to widen that gate to(chrome || gecko) && android, for testing in a preview environment. If confirmed, the fix should be upstreamed to prosemirror-view and this patch dropped.Alternative synchronous variant (cancels the
beforeinputevent and routes it through the keymap directly) is available at 3e0df7a.